<?php
namespace app\index\controller;


class Ajax extends Common
{
    function __construct()
    {
        parent:: __construct();
        if (!request()->isAjax()) {
            $this->assign('alert', '你想做什么?');
            $this->assign('url', '/');
            exit($this->fetch('pc/common/msg'));
        }
    }
	
    protected function _initialize()
    {
        config('default_return_type', 'json');//JSON格式输出
        $this->returnType = 'json';
        parent::_initialize(); // TODO: Change the autogenerated stub
    }
}